<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Team Bonus Summary</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link type="text/css" href="/css/start/jquery-ui-1.8.21.custom.css" rel="Stylesheet" />	
<link type="text/css" href="/css/1pxtable.css" rel="Stylesheet" />	
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/jquery-ui-1.8.21.custom.min.js"></script>

<title>Untitled Document</title>
<link rel="stylesheet" href="/js/chosen/chosen.css" />
</head>
<body style="font-family:Arial, Helvetica, sans-serif; line-height:20px;">
<form method = "post" action = "">
<?php $stDetail = new Model_DbTable_Roster_Stafflogindetail();?>
<?php if(!$this->unsetUabonus){?>
Please Input Password <input type = "password" name = "password" ></input><br/><br/>
<input type = "submit" name = "submit" value = "submit"></input>
<?php }else{?>
	<?php $stfList = $this->staffList;?>
	<?php foreach ($this->unsetUabonus as $k => $v){
		?>
	<table>
		<tr>
			<td colspan = "3">Shop: <?php echo $v['shop_code']?></td>
			
		</tr>
		<tr>
			<td colspan = "2">Amount: $<?php echo $v['amount']?></td>
			<td>Reason</td>
		</tr>
		<tr>
			<td>Staff 1</td>
			<td><select name="shopB1[<?php echo $v['id']?>]" data-placeholder="Staff Name" class="chzn-select" style="width:300px" >
      				<option value="" ></option>
      				
      <?php foreach($stfList[$v['shop_id']] as $k2 => $v2) {     	
        				$stfD = $stDetail->getDetail($v2);?>
      	
      					<option value="<?=$stfD["id"]?>">
        <?=ucwords($stfD["ni"])?>
        .
        <?=chr($stfD["il"]+64)?> ( <?=ucwords(Model_EncryptHelper::getSslPassword($stfD["n"]))?> )
        <?php if($stfD['a'] == 9){ echo '(Leave)';}?>
        </option>
      <?php } ?>
    </select></td>
    		<td><input type = "text" name = "shopReason1[<?php echo $v['id']?>]"></input></td>
		</tr>
		<tr>
			<td>Staff 2</td>
			<td><select name="shopB2[<?php echo $v['id']?>]" data-placeholder="Staff Name" class="chzn-select" style="width:300px">
      				<option value=""></option>
      <?php foreach($stfList[$v['shop_id']] as $k2 => $v2) {
        				$stfD = $stDetail->getDetail($v2);?>
      	
      					<option value="<?=$stfD["id"]?>">
        <?=ucwords($stfD["ni"])?>
        .
        <?=chr($stfD["il"]+64)?> ( <?=ucwords(Model_EncryptHelper::getSslPassword($stfD["n"]))?> )
        <?php if($stfD['a'] == 9){ echo '(Leave)';}?>
        </option>
      <?php } ?>
    </select></td>
    		<td><input type = "text" name = "shopReason2[<?php echo $v['id']?>]"></input></td>
		</tr>

			

	</table>	
	<?php }?>
<input type = "submit" name = "submit_bonus" value = "Submit Bonus"></input>
<?php }?>

</form>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
  <script src="/js/chosen/chosen.jquery.js" type="text/javascript"></script>
  <script type="text/javascript"> 
    var config = {
      '.chzn-select': {allow_single_deselect:true},
    }
    for (var selector in config) {
      $(selector).chosen(config[selector]);
    }
  </script>
</body>
</html>
